package com.leo.blog.service;

import com.leo.blog.dto.BlogerExecution;
import com.leo.blog.entity.Bloger;
import com.leo.blog.exceptions.BlogerOperationException;

public interface BlogerService {
	
	/**
	 * 添加用户
	 * @param bloger
	 * @return
	 */
	BlogerExecution addBloger(Bloger bloger) throws BlogerOperationException;
	BlogerExecution addSelective(Bloger bloger) throws BlogerOperationException;
	
	/**
	 * 根据id查询用户信息
	 * @param blogerId
	 * @return
	 */
	BlogerExecution getBlogerById(int blogerId);
	
	/**
	 * 更新用户信息
	 * @param bloger
	 * @return
	 */
	BlogerExecution updateBloger(Bloger bloger);
	BlogerExecution updateBlogerSelective(Bloger bloger);
	
	/**
	 * 根据id删除用户
	 * @param blogerId
	 * @return
	 */
	BlogerExecution deleteBlogerById(int blogerId);
	
	/**
	 * 根据名称查询信息
	 * @param userName
	 * @return
	 */
	BlogerExecution getUserByLoginName(String userName);
	
	/**
	 * 查询列表和列表总数
	 * @param blogerCondition
	 * @param rowIndex
	 * @param pageSize
	 * @return
	 */
	BlogerExecution getBlogerList(Bloger blogerCondition, int pageIndex, int pageSize);
	
}
